package com.huang;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

/**
 * @author HuangShen
 * @Description
 * @create 2021-03-22 12:37
 */
public class StringTest {

    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
        System.out.println(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss")));

    }
}
